// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** 默认 GET /api/ */
export async function indexUsingGet(options?: { [key: string]: any }) {
  return request<API.BaseResponsestring>('/api/', {
    method: 'GET',
    ...(options || {}),
  });
}

/** 管理员资源页 GET /api/adminResource */
export async function adminResourceUsingGet(options?: { [key: string]: any }) {
  return request<API.BaseResponsestring>('/api/adminResource', {
    method: 'GET',
    ...(options || {}),
  });
}

/** 失败 GET /api/fail */
export async function errorUsingGet(options?: { [key: string]: any }) {
  return request<API.BaseResponse>('/api/fail', {
    method: 'GET',
    ...(options || {}),
  });
}

/** 获取IP GET /api/getIp */
export async function getIpUsingGet(options?: { [key: string]: any }) {
  return request<API.BaseResponsestring>('/api/getIp', {
    method: 'GET',
    ...(options || {}),
  });
}

/** 获取端口号 GET /api/getPort */
export async function getPortUsingGet(options?: { [key: string]: any }) {
  return request<API.BaseResponsestring>('/api/getPort', {
    method: 'GET',
    ...(options || {}),
  });
}

/** 参数请求 GET /api/hello */
export async function helloUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.helloUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsestring>('/api/hello', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 资源页 GET /api/resource */
export async function resourceUsingGet(options?: { [key: string]: any }) {
  return request<API.BaseResponsestring>('/api/resource', {
    method: 'GET',
    ...(options || {}),
  });
}
